require("../../common/vendor.js"), (global.webpackJsonp = global.webpackJsonp || []).push([ [ "pagesA/pages/userA/setting" ], {
    "05c0": function(e, n, t) {
        t.r(n);
        var o, a = t("b3e6"), u = t.n(a);
        for (o in a) "default" !== o && function(e) {
            t.d(n, e, function() {
                return a[e];
            });
        }(o);
        n.default = u.a;
    },
    "76c5": function(e, n, t) {
        t.d(n, "b", function() {
            return a;
        }), t.d(n, "c", function() {
            return u;
        }), t.d(n, "a", function() {
            return o;
        });
        var o = {
            uAvatar: function() {
                return t.e("uview-ui/components/u-avatar/u-avatar").then(t.bind(null, "eacb"));
            },
            uIcon: function() {
                return t.e("uview-ui/components/u-icon/u-icon").then(t.bind(null, "bee6"));
            },
            uCellGroup: function() {
                return t.e("uview-ui/components/u-cell-group/u-cell-group").then(t.bind(null, "db5f"));
            },
            uCellItem: function() {
                return t.e("uview-ui/components/u-cell-item/u-cell-item").then(t.bind(null, "6172"));
            }
        }, a = function() {
            this.$createElement;
            this._self._c;
        }, u = [];
    },
    "9aa4": function(e, n, t) {
        var o = t("b521");
        t.n(o).a;
    },
    b3e6: function(e, r, i) {
        (function(o) {
            Object.defineProperty(r, "__esModule", {
                value: !0
            }), r.default = void 0;
            var e, t = (e = i("a34a")) && e.__esModule ? e : {
                default: e
            };
            function c(e, n, t, o, a, u, r) {
                try {
                    var i = e[u](r), c = i.value;
                } catch (e) {
                    return t(e), 0;
                }
                i.done ? n(c) : Promise.resolve(c).then(o, a);
            }
            function a(i) {
                return function() {
                    var e = this, r = arguments;
                    return new Promise(function(n, t) {
                        var o = i.apply(e, r);
                        function a(e) {
                            c(o, n, t, a, u, "next", e);
                        }
                        function u(e) {
                            c(o, n, t, a, u, "throw", e);
                        }
                        a(void 0);
                    });
                };
            }
            var u = getApp(), n = {
                data: function() {
                    return {
                        pic: "https://uviewui.com/common/logo.png",
                        show: !0,
                        module_name: u.globalData.module_name,
                        showAlert_login: !1,
                        userinfo: o.getStorageSync("userinfo"),
                        setting: o.getStorageSync("setting"),
                        wxCode: ""
                    };
                },
                onShow: function() {
                    var n = this;
                    return a(t.default.mark(function e() {
                        return t.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, n.$onLaunched;

                              case 2:
                                n.user_info(), o.hideLoading();

                              case 4:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                onLoad: function(e) {
                    var n = this;
                    return a(t.default.mark(function e() {
                        return t.default.wrap(function(e) {
                            for (;;) switch (e.prev = e.next) {
                              case 0:
                                return e.next = 2, n.$onLaunched;

                              case 2:
                                n.setting = o.getStorageSync("setting"), n.userinfo = o.getStorageSync("userinfo"), 
                                n.module_name = u.globalData.module_name, n.getWxCode();

                              case 7:
                              case "end":
                                return e.stop();
                            }
                        }, e);
                    }))();
                },
                methods: {
                    info: function() {
                        o.navigateTo({
                            url: "info2"
                        });
                    },
                    getPhoneNumber: function(e) {
                        var n = this;
                        n.wxCode || wx.login({
                            success: function(e) {
                                n.wxCode = e.code;
                            }
                        });
                        var t = u.globalData.util.url("entry/wxapp/userinfonew", {
                            m: u.globalData.module_name
                        }), e = {
                            code: n.wxCode,
                            encryptedData: e.detail.encryptedData,
                            iv: e.detail.iv,
                            openid: o.getStorageSync("openid")
                        };
                        o.request({
                            url: t,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: e,
                            success: function(e) {
                                1 == e.data.status ? (o.setStorageSync("userinfo", e.data.data), n.userinfo = e.data.data, 
                                n.wxCode = "", o.showToast({
                                    title: "绑定成功",
                                    icon: "none"
                                })) : o.showToast({
                                    title: "您取消了操作",
                                    icon: "none"
                                });
                            }
                        });
                    },
                    user_info: function() {
                        var n = this, e = u.globalData.util.url("entry/wxapp/userinfonew", {
                            m: u.globalData.module_name
                        });
                        o.request({
                            url: e,
                            method: "POST",
                            header: {
                                "content-type": "application/x-www-form-urlencoded"
                            },
                            data: {
                                openid: o.getStorageSync("openid")
                            },
                            success: function(e) {
                                o.setStorageSync("userinfo", e.data.data), n.userinfo = e.data.data;
                            }
                        });
                    },
                    getWxCode: function() {
                        var n = this;
                        wx.login({
                            success: function(e) {
                                n.wxCode = e.code;
                            }
                        });
                    },
                    getUserProfile: function() {
                        var t = this;
                        wx.getUserProfile({
                            desc: "更新会员资料",
                            success: function(e) {
                                var n = u.globalData.util.url("entry/wxapp/userinfonew", {
                                    m: u.globalData.module_name
                                }), e = {
                                    avatarUrl: e.userInfo.avatarUrl,
                                    nickName: e.userInfo.nickName,
                                    openid: o.getStorageSync("openid")
                                };
                                o.request({
                                    url: n,
                                    method: "POST",
                                    header: {
                                        "content-type": "application/x-www-form-urlencoded"
                                    },
                                    data: e,
                                    success: function(e) {
                                        1 == e.data.status ? (o.setStorageSync("userinfo", e.data.data), t.userinfo = e.data.data, 
                                        o.showToast({
                                            title: "同步成功",
                                            icon: "none"
                                        })) : o.showToast({
                                            title: "同步失败",
                                            icon: "none"
                                        });
                                    }
                                });
                            }
                        });
                    }
                }
            };
            r.default = n;
        }).call(this, i("543d").default);
    },
    b521: function(e, n, t) {},
    d3dc: function(e, n, t) {
        (function(e) {
            function n(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            t("0cda"), n(t("66fd")), e(n(t("dc3f")).default);
        }).call(this, t("543d").createPage);
    },
    dc3f: function(e, n, t) {
        t.r(n);
        var o, a = t("76c5"), u = t("05c0");
        for (o in u) "default" !== o && function(e) {
            t.d(n, e, function() {
                return u[e];
            });
        }(o);
        t("9aa4");
        var r = t("f0c5"), a = Object(r.a)(u.default, a.b, a.c, !1, null, null, null, !1, a.a, void 0);
        n.default = a.exports;
    }
}, [ [ "d3dc", "common/runtime", "common/vendor" ] ] ]);